home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 1874.ZIP / T-TOOLS.ZIP / TOOLINFO.ASC < prev   
Text File  |  1989-12-20  |  6KB  |  175 lines

  1. TOOLINFO.ASC
  2.         ,-----------------------------------------------------------,
  3.         |                        Turbo Tools                        |
  4.         |                        version 1.0                        |
  5.         |             for Turbo Pascal 4.0, 5.0 and 5.5             |
  6.         |                      Chuck Esterbrook                     |
  7.         |                       copyright 1989                      |
  8.         |                                                           |
  9.         | SEE TOOLDOC.ASC FOR COMPLETE DOCUMENTATION TO TURBO TOOLS |
  10.         |                 DON'T FORGET TO REGISTER!                 |
  11.         '-----------------------------------------------------------'
  12.  
  13.  
  14. COMPILER DIRECTIVES FOR ALL UNITS:
  15.   Turbo Pascal 4.0     B-,D+,   F-,I-,L+,N-,   R+,S+,T-,V-
  16.                5.0  A+,B-,D+,E-,F-,I-,L+,N-,O-,R+,S+,   V-
  17.                5.5  A+,B-,D+,E-,F-,I-,L+,N-,O-,R+,S+,   V-
  18.  
  19. FILES INSTALLED:
  20.   TOOLINFO.ASC  this file!
  21.   TOOLDOC.ASC   complete documentation for Turbo Tools
  22.   CRT2DEMO.PAS  demonstration program for the units Crt2 and Keys
  23.   *.TPU         Turbo Pascal Unit files for libraries
  24.  
  25. LIST OF UNITS:
  26.   unit Crt2
  27.   unit Input
  28.   unit StrFuncs
  29.   unit Keys
  30.  
  31. DESCRIPTION OF UNITS:
  32.   unit Crt2            library of screen routines
  33.                        supplement to the Turbo Pascal Crt unit
  34.  
  35.   unit Input           input routines for integers and strings
  36.                        replacements for Readln
  37.  
  38.   unit Keys            easy to remember constants that represent the ASCII
  39.                        codes for keys like F1, DELETE, and HOME
  40.  
  41.   unit StrFuncs        string functions library
  42.                        supplement to Turbo Pascal's string functions
  43.  
  44. INTERFACES OF THE UNITS:
  45.  
  46. unit Crt2;
  47.  
  48. interface
  49.  
  50. uses
  51.   crt,
  52.   dos;
  53.  
  54. type
  55.   CursorTypes = (CursorOff,NormalCursor,HalfCursor,FullCursor);
  56.   SetOfChar = set of char;
  57.  
  58. var
  59.   CursorState : CursorTypes;
  60.   ScrLength,
  61.   ScrWidth    : byte;
  62.   VideoSeg    : word;
  63.  
  64. function  Center(st : string) : string;
  65. function  CanUseColor : boolean;
  66. procedure Cursor(Mask : CursorTypes);
  67. procedure DelChar(Count : byte);
  68. procedure Frame(x1,y1,x2,y2,Top,Bottom,Left,Right : byte);
  69. function  GetKey(Acceptable : SetOfChar) : char;
  70. function  GetKeyUp(Acceptable : SetOfChar) : char;
  71. function  GlobalX : byte;
  72. function  GlobalY : byte;
  73. procedure InsSpace(Count : byte);
  74. procedure LowBeep;
  75. procedure WriteLast(ch : char);
  76.  
  77. {-----------------------------------------------------------------------------}
  78.  
  79. unit Input;
  80.  
  81. interface
  82.  
  83. uses
  84.   crt,
  85.   Crt2;
  86.  
  87. const
  88.   MinShortInt =        -128;
  89.   MaxShortInt =         127;
  90.   MinByte     =           0;
  91.   MaxByte     =         255;
  92.   MinInt      =      -32768;
  93. { MaxInt      =       32767; Predefined in Turbo Pascal's System unit }
  94.   MinWord     =           0;
  95.   MaxWord     =       65535;
  96.   MinLongInt  = -2147483468;
  97. { MaxLongInt  =  2147483467; Predefined in Turbo Pascal's System unit }
  98.  
  99.   AllChars : set of char = [#32..#254];
  100.  
  101. type
  102.   SetOfChar = set of char;
  103.   EscapeFlag = (CanEscape,NoEscape);
  104.  
  105. var
  106.   Escaped : boolean;
  107.  
  108.  
  109. function ReadShortInt(Min,Max,Init : shortint;  Field : byte;
  110.                         EscapeBy,ExtEscape : SetOfChar)         : shortint;
  111. function ReadByte    (Min,Max,Init : byte;      Field : byte;
  112.                         EscapeBy,ExtEscape : SetOfChar)         : byte;
  113. function ReadInteger (Min,Max,Init : integer;   Field : byte;
  114.                         EscapeBy,ExtEscape : SetOfChar)         : integer;
  115. function ReadWord    (Min,Max,Init : word;      Field : byte;
  116.                         EscapeBy,ExtEscape : SetOfChar)         : word;
  117. function ReadLongInt (Min,Max,Init : longint;   Field : byte;
  118.                         EscapeBy,ExtEscape : SetOfChar)         : longint;
  119.  
  120. function ReadStr(MaxLen : byte; Acceptable,EscapeBy,
  121.                                 ExtEscape : SetOfChar) : string;
  122.  
  123. {-----------------------------------------------------------------------------}
  124.  
  125. unit Keys;
  126.  
  127. interface
  128.  
  129. const
  130.   { SINGLE CODE SPECIAL KEYS }
  131.   _Backspace  _Enter  _Escape  _Tab  _Extended
  132.  
  133.   { EXTENDED CODE SPECIAL KEYS }
  134.   _ShiftTab
  135.   _Up     _CtrlUp     _AltUp      _Down   _CtrlDown   _AltDown
  136.   _Left   _CtrlLeft   _AltLeft    _Right  _CtrlRight  _AltRight
  137.  
  138.   _Home      _CtrlHome      _AltHome
  139.   _End       _CtrlEnd       _AltEnd
  140.   _PageUp    _CtrlPageUp    _AltPageUp
  141.   _PageDown  _CtrlPageDown  _AltPageDown
  142.  
  143.   _Ins  _CtrlIns  _AltIns
  144.   _Del  _CtrlDel  _AltDel
  145.   _Ctr  _CtrlCtr  _AltCtr
  146.  
  147.   _F1 .. _F12
  148.   _ShiftF1 .. _ShiftF12
  149.   _CtrlF1 .. _CtrlF12
  150.   _AltF1 .. _AltF12
  151.  
  152.   _AltA .. _AltZ
  153.   _Alt0 .. _Alt9
  154.  
  155. {-----------------------------------------------------------------------------}
  156.  
  157. unit StrFuncs;
  158.  
  159. interface
  160.  
  161. function CopyEnd(st : string; x : byte) : string;
  162. function DelOccurs(Find,Target : string; x : byte) : string;
  163. function LowCase(ch : char) : char;
  164. function LowStr(st : string) : string;
  165. function PosOccur(Find,Target : string; n : byte) : byte;
  166. function Occurs(Find,Target : string) : byte;
  167. function Shave(st : string) : string;
  168. function ShaveLead(st : string) : string;
  169. function ShaveTrail(st : string) : string;
  170. function UpStr(st : string) : string;
  171.  
  172. {----------------------------------------------------------------------------}
  173. {    END OF TOOLINFO.ASC FOR TURBO TOOLS 1.0 (C) 1989 BY CHUCK ESTERBROOK    }
  174. {----------------------------------------------------------------------------}
  175.